﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="CustomerContactSystem.Core" namespace="CustomerContactSystem.Core.Model">
  <class name="EnquiryClosure" table="EnquiryClosures">
    <id name="Id">
      <generator class="native"></generator>
    </id>
    <property name="DateClosed" not-null="true" />
    <many-to-one name="ClosedBy" class="User" column="ClosedById"  not-null="true" lazy="false" fetch="join" foreign-key="FK_EnquiryClosures_Users"></many-to-one>
    <many-to-one name="ClosedByDepartment" class="Department" column="ClosedByDepartmentId"  not-null="true" lazy="false" fetch="join" foreign-key="FK_EnquiryClosures_Departments"></many-to-one>
    <many-to-one name="ClosedByGroup" class="UserGroup" column="ClosedByGroupId"  not-null="true" lazy="false" fetch="join" foreign-key="FK_EnquiryClosures_UserGroups"></many-to-one>
    <property name="CustomerWasContacted" not-null="true" />
    <property name="CustomerWasContactedBy" not-null="true" length="20" />
    <property name="DeadlineMet" not-null="true" />
    <property name="EnquiryResponse" not-null="true" type="StringClob" />
  </class>
</hibernate-mapping>